Automatic software testing refers to the process of testing software using an automatic testing tool. The automatic testing tool may control the execution of the software, compare the actual behaviors of the software with the predicted outcomes, and determine whether the software has any bugs or issues. To test a software's graphical user interface (GUI), the automatic testing tool may generate simulated user actions such as keystrokes and mouse clicks as inputs to the GUI, observe the behavior of the GUI, and validate whether the observed behavior is as predicted. Automatic software testing is an important procedure for improving the overall quality of software, and is cost-effective because the test cases may be repeatedly executed. Nonetheless, implementing the test cases may require a large amount of upfront efforts, and the test cases may not be portable to a different piece of software or a different automatic testing tool.
Since GUI software is designed for human access, it is often hard to simulate all the user actions that can be performed on the GUI. Therefore, the conventional GUI automatic testing tools are more focused on the displayed components in the GUI, while ignoring the testing of structure and organization of the software. When software becomes more and more sophisticated, and the GUI utilizes multiple technologies in multiple environments, the number of test scenarios increases as well. As a result, developing automatic test cases are often conducted by copy-paste instead of code reuse. Also, maintaining the test cases become a burden when the tightly-coupled test code causes heavy code dependencies.